#define _CRT_SECURE_NO_WARNINGS 1
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define _CRT_SECURE_NO_WARNINGS


typedef struct num {
    struct num* front;
    int a;
    struct num* next;
}num, * pnum;

void double_link_creat(pnum* phead, pnum pnew)
{
    pnum pmov = *phead;
    if (*phead == NULL)
    {
        *phead = pnew;
        pnew->front = NULL;
        pnew->next = NULL;
    }
    else {
        while (pmov->next != NULL)
        {
            pmov = pmov->next;
        }
        pmov->next = pnew;
        pnew->front = pmov;
        pnew->next = NULL;
    }
}

void double_link_range(pnum phead)
{
    pnum pmov = phead;
    while (pmov != 0)
    {
        printf("%d ", pmov->a);
        pmov = pmov->next;
    }

}


int main() {
    int n = 0;
    int i;
    scanf("%d", &n);
    int* a = (int*)calloc(n, sizeof(int));
    int* b = (int*)calloc(n, sizeof(int));
    pnum phead_a = NULL;
    pnum pnew_a = NULL;
    pnum phead_b = NULL;
    pnum pnew_b = NULL;

    for (i = 0; i < n; i++)
    {
        scanf("%d", &a[i]);
    }
    for (i = 0; i < n; i++)
    {
        scanf("%d", &b[i]);
    }
    for (i = 0; i < n; i++)
    {
        pnew_a = (pnum)malloc(sizeof(num));
        pnew_a->a = a[i];
        double_link_creat(&phead_a, pnew_a);
        pnew_b = (pnum)malloc(sizeof(num));
        pnew_b->a = b[i];
        pnew_b->a = pnew_a->a + pnew_b->a;
        double_link_creat(&phead_b, pnew_b);
    }
    double_link_range(phead_b);

    return 0;
}
